package com.kx.springboot.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class UserController {
    @RequestMapping("/index")
    public Object index(HttpServletRequest request, Model model,Integer id){
        model.addAttribute("username","zkx");
        request.getSession().setAttribute("data","sessionData");
        return "index";
    }
}
